package com.le.springbootmybatis.core;

import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
public class AjaxResult <T>{
    private boolean success;
    private int code;
    private String msg;
    private T data;

    public AjaxResult(T data){
        this.success=true;
        this.code=200;
        this.msg="添加成功";
        this.data=data;
    }
    public AjaxResult(int code,String msg){
        this.success=false;
        this.code=code;
        this.msg=msg;
    }
}
